export const AppropriationQueries = {
    GetAppropriations: `
    SELECT
      id,
      appropriationName,
      appropriationDescription,
      appropriationStandard,
      appropriationState,
      appropriationStart,
      appropriationEnd,
      appropriationCreatorId,
      appropriationApproveDate,
      appropriationCostApproverId,
      appropriationCostApproverName,
      appropriationCostApproveComment,
      appropriationPreApproverId,
      appropriationPreApproverName,
      appropriationPreApproveComment
    FROM my_schema.appropriation
    `,

    GetApprovedAppropriations: `
    SELECT
      id,
      appropriationName,
      appropriationDescription,
      appropriationStandard,
      appropriationState,
      appropriationStart,
      appropriationEnd,
      appropriationCreatorId,
      appropriationApproveDate,
      appropriationCostApproverId,
      appropriationCostApproverName,
      appropriationCostApproveComment,
      appropriationPreApproverId,
      appropriationPreApproverName,
      appropriationPreApproveComment
    FROM my_schema.appropriation
    WHERE
      appropriationState = '已生效'
    `,
  
    GetAppropriationById: `
    SELECT
      id,
      appropriationName,
      appropriationDescription,
      appropriationStandard,
      appropriationState,
      appropriationStart,
      appropriationEnd,
      appropriationCreatorId,
      appropriationApproveDate,
      appropriationCostApproverId,
      appropriationCostApproverName,
      appropriationCostApproveComment,
      appropriationPreApproverId,
      appropriationPreApproverName,
      appropriationPreApproveComment
    FROM my_schema.appropriation
    WHERE
      id = ?
    `,
  
    AddAppropriation: `
    INSERT INTO my_schema.appropriation (appropriationName, appropriationDescription, appropriationStandard, appropriationState, appropriationStart, appropriationEnd, appropriationCreatorId, 
      appropriationApproveDate, 
      appropriationCostApproverId,
      appropriationCostApproverName,
      appropriationCostApproveComment,
      appropriationPreApproverId,
      appropriationPreApproverName,
      appropriationPreApproveComment, createdTime, updatedTime)
      VALUES ?
    `,

    UpdateAppropriationById: `
    UPDATE my_schema.appropriation
    SET ?
    WHERE
      id = ?
    `,
  
    DeleteAppropriationById: `
    DELETE FROM my_schema.appropriation
    WHERE
      id = ?
    `
  };